import request from "../request/request";
import {UserData} from "@/type/UserData.ts";

interface loginData{
    userId: number,
    userName: string,
    password: string,
    email: string
}
export function login(data: loginData){

    return request({
        url: 'api/auth/login',
        method: 'POST',
        data: data
    })
}

export function refreshToken(){

    return request({
        url: 'api/auth/refreshToken',
        method: "POST"
    })
}

export function registry(data: UserData){

    return request({
        url: 'api/auth/registry',
        method: "POST",
        data: data
    })
}